/**
  ******************************************************************************
  * @file    kea128_pit.h
  * @author  huaxicunzhang
  * @version V1.0
  * @date    18-8-2015
  * @brief   This file contains all the functions prototypes for the GPIO 
  *          firmware library.
  ******************************************************************************
**/ 

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __KEA128_PIT_H
#define __KEA128_PIT_H
#ifdef __cplusplus
 extern "C" {
#endif
#include "SKEAZ1284.h"
	 
typedef enum
{
    PIT_CHANNEL0 = 0,       /*!< PIT channel 0 */
    PIT_CHANNEL1            /*!< PIT channel 1 */
} PITx_CHANNEL;
#define IS_PIT_CHANNEL(CHANNEL)  (((CHANNEL)==PIT_CHANNEL0 ||\
																	 (CHANNEL)==PIT_CHANNEL1	))

typedef enum
{
    PIT_Mode_ms,       //ms中断
    PIT_Mode_us        //us	中断
} PITx_Timer_Mode;

typedef struct
{
	PITx_Timer_Mode PIT_Mode;
  PITx_CHANNEL CHANNELx;
	uint32_t Timer ;
	
}PIT_InitTypeDef;



void PIT_ClearFlag(PITx_CHANNEL CHANNELx);
void PIT_ITConfig(PITx_CHANNEL CHANNELx ,FunctionalState NewState);
void PIT_Cmd(PITx_CHANNEL CHANNELx ,FunctionalState NewState);
void PIT_Init(PIT_InitTypeDef *PIT_InitStructure);

#endif	 

